<script type="text/javascript" >
$(document).ready(function(){


     $(".linkcolumn").click(function(event){
        var id_array = $(this).attr('mid').split('-');
        var rid = $(this).attr('rid');
        var url = '/matter/view/id/'+id_array[2]+'/rid/'+rid;
        window.open(url);
     });


    <?if($this->display_style){?>
          $('.display_actor,.display_status').css('display','none');
              $('.display_status,').css('display','inline-block');
    <?}else {?>
              $('.display_actor,.display_status').css('display','none');
              $('.display_actor').css('display','inline-block');
    <?}?>

});
</script>

<?php if(count($this->paginator)):?>
<?php if(count($this->paginator) > 1)
   echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml');
?>
<?php 
$rindex = 0;
foreach($this->paginator as $matter):?>

<div class="row-tab" id="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex++?>" style="background: <?php echo ($matter['Ctnr'])?'lightcyan':'white'; ?>" >
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor display_status linkcolumn column column-case"><span class="<?php echo ($matter['dead'])?"matter-dead": "";?>"><?php echo $matter['Ref']; ?></span></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor display_status linkcolumn column column-cat"><?php echo $matter['Cat']; ?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor display_status linkcolumn column column-status"><?php echo $matter['Status'];?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_status linkcolumn column column-date"><?php echo $matter['Status_date'];?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor display_status linkcolumn column column-client"><?php echo htmlentities($matter['Client']);?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor display_status linkcolumn column column-client-ref"><?php echo htmlentities($matter['ClRef']);?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor linkcolumn column column-agent"><?php echo htmlentities($matter['Agent']);?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor linkcolumn column column-agent-ref"><?php echo htmlentities($matter['AgtRef']);?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor linkcolumn column column-title"><?php echo htmlentities($matter['Title']);?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor linkcolumn column column-inventor"><?php echo htmlentities($matter['Inventor1']);?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_actor display_status linkcolumn column column-date"><?php echo $matter['Filed'];?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_status linkcolumn column column-filing-no" title="<?=$matter['FilNo']?>"><?php echo $matter['FilNo'];?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_status linkcolumn column column-date" title="<?=$matter['Published']?>"><?php echo $matter['Published'];?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_status column column-pub-no publink" title="<?=$matter['PubNo']?>" id="<?=$matter['country']."~".$matter['PubNo']?>"><?php
    if ($matter['origin'] == 'EP') $CC = 'EP';
    else $CC = $matter['country'];
    $country_code = $matter['country'];
    $removethese = array("/^$country_code/",'/ /', '/,/', '/-/', '/\//');
    $pubno = preg_replace($removethese, '', $matter['PubNo']);
    if ($CC == 'US') $pubno = substr($pubno, 0, 4) . substr($pubno, -6);
?>
<a href="http://worldwide.espacenet.com/publicationDetails/biblio?DB=EPODOC&CC=<?=$CC?>&NR=<?=$pubno?>" target="_blank"><?php echo $matter['PubNo'];?></a></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_status linkcolumn column column-date" title="<?=$matter['Granted']?>"><?php echo $matter['Granted'];?></div>
<div mid="edit-matter-<?php echo $matter['ID'] ?>" rid="<?=$rindex?>" class="display_status linkcolumn column column-pub-no" title="<?=$matter['GrtNo']?>"><?php echo $matter['GrtNo'];?></div>
</div>

<?php endforeach; ?>
<?php if(count($this->paginator) > 1)
   echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml');
?>
<?php endif; ?>
